Skip to content

Allow testing feature branches, and allow manual trigger via GH UI - #1355

Open
hugovk wants to merge 1 commit into
pypa:mainfrom
hugovk:happy-ci
Open

Allow testing feature branches, and allow manual trigger via GH UI#1355
hugovk wants to merge 1 commit into
pypa:mainfrom
hugovk:happy-ci

Conversation

@hugovk

@hugovk hugovk commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

I prefer to make sure my code passes on CI, before opening a PR and pinging all maintainers.

Right now, this CI only runs on pushes to main. This means I can only work on one PR at a time, and if I forget I have a PR open from main, I can accidentally close it by resetting to upstream: #1263 (comment)

Won't this double-run CI when we make a PR from a in-repo branch?

Yes, but I recommend creating PRs from your own fork and not from upstream:

  • You get total control on whether the CI is even enabled
  • By default it's disabled, you need explicit opt-in
  • You don't "clutter" upstream with personal branches, which may live for years and affect everyone who forks

It's not common. Of the last 300 PRs to this repo, only 16 were in-repo:

  • 11 dependabot
  • 4 Henry
  • 1 Brett

And the CI is fast, it doesn't use up too much time.

Plus, they're technically not really double-runs, a push and a pull_request test different things. A push is just what's on the branch. A pull_request simulates a merge against main, and tests that. Occasionally you get different results, and this can be useful info!

You can also make a PR to your fork to get CI.

Indeed, but that's also adding extra friction to contribution.

@henryiii

Copy link
Copy Markdown
Contributor

What about just adding workflow_dispatch (which allows checking locally), but not removing the branch filter? Any in-repo job (like all Dependabot runs!) now will run 120+ jobs instead of the normal 60+.

@hugovk

hugovk commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

What about just adding workflow_dispatch (which allows checking locally), but not removing the branch filter?

That's also friction:

  1. git push
  2. Go to https://github.com/hugovk/packaging/actions
  3. Click Test on the left
  4. Click "Run workflow" at the top right
  5. Click "Run workflow" again

Or some gh command, but still, that's friction and a special case for this repo, compared to a simple git push.

Any in-repo job (like all Dependabot runs!) now will run 120+ jobs instead of the normal 60+.

Personally, I don't think that's much of a problem for max two Dependabot PRs per month, plus the occasional security PR. I doubt anyone will even notice it, and it's not much extra CI time.

If it's a blocker, we can add a guard to prevent in-repo, non-main pushes. Something like:

if: github.event_name != 'push' || github.event.repository.fork || github.ref_name == 'main'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants